<?php 
	include '../admin_head.php';
	$id = $_GET['id'];
	$sql = "select name,email,sex,class,jifen from ".PRE."user where id='{$id}'";
	$result = mysql_query($sql);
	$list = mysql_fetch_assoc($result);
	

	
	mysql_free_result($result);
	
?>
			<div class="admin_main_nav">用户管理&gt;&gt;编辑用户</div>
			<div id="admin_edituser" class="admin_form admin_main_index">
			<div class="user_index_title"></div>
			<table width="500">
			<form action="action.php?a=edit&id=<?php echo $id?>" method="post">
				<tr>
					<th>用户名：</th>
					<td><input type="text" name="name" value="<?php echo $list['name']?>"/></td>
				</tr>
				<tr>
					<th>电子邮箱：</th>
					<td><input type="text" name="email" value="<?php echo $list['email']?>"/></td>
				</tr>
				<tr>
					<th>用户积分：</th>
					<td><input type="text" name="jifen" value="<?php echo $list['jifen']?>"/></td>
				</tr>
				<tr>
					<th>性别：</th>
					<td class="radio">
						<input type="radio" name="sex" value="1" <?php echo $list['sex'] == 1 ? 'checked': '';?>/><span>男</span>
						<input type="radio" name="sex" value="0"<?php echo $list['sex'] == 0 ? 'checked': '';?>/><span>女</span>
						<input type="radio" name="sex" value="2"<?php echo $list['sex'] == 2 ? 'checked': '';?>/><span>保密</span>
					</td>
				</tr>
				<tr>
					<th>用户级别：</th>
					<td class="radio">
						<input type="radio" name="class" value="0" <?php echo $list['class'] == 0 ? 'checked': '';?>/><span>超级管理员</span>
						<input type="radio" name="class" value="1"<?php echo $list['class'] == 1 ? 'checked': '';?>/><span>管理员</span>
						<input type="radio" name="class" value="2" <?php echo $list['class'] == 2 ? 'checked': '';?>/><span>普通会员</span>
					</td>
				</tr>
				<tr>
					<td colspan="2" class="submit">
						<input type="submit" value="更新用户" />
						<input type="reset" value="重置" />
					</td>
				</tr>
			</form>
		</table>
		</div>


<?php include '../admin_footer.php';?>